<template>
  <div>
    <b-container fluid>
      <b-row class="p-2">
        <b-button-group size="sm">
          <b-button variant="danger">删除</b-button>
          <b-button variant="success" @click="newCommodity">添加</b-button>
          <b-button variant="info">刷新</b-button>
        </b-button-group>
      </b-row>
    </b-container>
    <b-card>
      <haier-commodity-info :tid="tid"></haier-commodity-info>
    </b-card>
  </div>
</template>

<script>
import CommodityInfo from "./CommodityInfo";

export default {
  data() {
    return {
      tid: "",
      fields: [{ key: "check-box", label: "" }],
      items: [],
    };
  },
  methods: {
    newCommodity() {
      this.$router.push({
        path: `/commodity/add/${this.tid}`,
      });
    },
  },
  components: {
    "haier-commodity-info": CommodityInfo,
  },
  created() {
    this.tid = this.$route.params.id;
  },
};
</script>


<style></style>
